<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <title><?php echo isset($this->pageTitle) ? $this->pageTitle : "Rao vặt hot | Mua bán | Rao vặt | Shopping"; ?></title>

    <meta content="TreRaoVat" name="author" http-equiv="author"/>
</head>
<body>
<div id="vj_container" class="clearfix">
    <?php
    Yii::app()->clientScript->registerCssFile(Yii::app()->BaseUrl . '/css/vj.css');
    Yii::app()->clientScript->registerCssFile(Yii::app()->BaseUrl . '/css/vj_index.css');

    Yii::app()->clientScript->registerCssFile(Yii::app()->BaseUrl . '/css/vj_home.css');
    Yii::app()->clientScript->registerCssFile(Yii::app()->BaseUrl . '/css/jcarousel.basic.css');
    Yii::app()->clientScript->registerCssFile(Yii::app()->BaseUrl . '/css/tretoday.css');

    Yii::app()->clientScript->registerCoreScript('jquery');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/tretoday.core.js');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/jquery-ui.js');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/tretoday.web.js');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/jquery.cycle.all.js');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/imagemenu.js');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/flexcroll.js');
    //Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/common.js');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/jquery.lightbox-0.5.js');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/kindeditor-4.1.4/kindeditor.js');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/jquery.jcarousel.min.js');
    Yii::app()->clientScript->registerScriptFile(Yii::app()->BaseUrl . '/js/jcarousel.basic.js');

    ?>
    <div id="vj_wrapper_content">
        <div id="vj_header">
            <div id="header_main">
                <div style="display: none;" id="list_name_top">
                    <div class="right_list_name_top">
                        <div class="icon_js">
                            <a href="#" id="prev_header" class="icon_prev_he">
                                <img
                                    src="<?php echo TreTodayUrl::home() . '/images/graphics/blank.gif' ?>" alt="prev"
                                    width="7"
                                    height="8"/>
                            </a>
                            <a href="#" id="next_header" class="icon_next_he">
                                <img
                                    src="<?php echo TreTodayUrl::home() . '/images/graphics/blank.gif' ?>" alt="next"
                                    width="7"
                                    height="8"/>
                            </a>
                            <label onClick="hide_js();" class="icon_close_he">
                                <img
                                    src="<?php echo TreTodayUrl::home() . '/images/graphics/blank.gif' ?>" alt="close"
                                    height="10" width="10"/>
                            </label>
                        </div>
                        <div class="right_list_top_sd" id="header_js">
                            <?php $this->widget('WidgetTopHeader') ?>
                        </div>
          <pre style="display:none">
              <code>$('#header_js').cycle({
                  fx: 'fade',
                  speed: 'fast',
                  timeout: 0,
                  next: '#next_header',
                  prev: '#prev_header'
                  });
              </code>
              </pre>
                    </div>
                </div>

                <div id="header">
                    <div class="top_menu">
                        <div class="menu_top_left">
                            <?php $this->widget('WidgetTopMenuButton') ?>
                        </div>
                        <div class="menu_top_right">
                            <?php $this->widget('WidgetTopLeftHeader') ?>
                        </div>
                    </div>

                    <div class="header_sub">
                        <div class="header_fix">
                            <div class="he_logo">
                                <div class="logo_">
                                    <a href="<?php echo TreTodayUrl::home() ?>">
                                        <img width="219"
                                             height="52"
                                             class="logo"
                                             alt="logo"
                                             src="<?php echo TreTodayUrl::getBlankImage() ?>"/>
                                    </a>
                                </div>
                                <p><?php if (Yii::app()->user->isGuest) { ?>
                                        <a href="<?php echo TreTodayUrl::getLoginUrl() ?>">Đăng
                                            nhập
                                        </a>&nbsp;&nbsp;|&nbsp;&nbsp;
                                        <a
                                            href="<?php echo TreTodayUrl::getRegisterUrl() ?>">Đăng
                                            ký
                                        </a>
                                    <?php } ?>  </p>
                            </div>
                            <div class="search_">
                                <div class="list_menu">
                                    <?php $app = isset($_GET['app']) ? $_GET['app'] : ''; ?>
                                    <a class="<?php echo $app == '' ? 'active_menu' : '' ?>"
                                       href="<?php echo TreTodayUrl::home() ?>">Trang Chủ
                                    </a>
                                    <a class="<?php echo $app == 'shopping' ? 'active_menu' : '' ?>"
                                       href="<?php echo TreTodayUrl::getAppUrl('shopping') ?>">Shopping
                                    </a>
                                    <a class="<?php echo $app == 'computer' ? 'active_menu' : '' ?>"
                                       href="<?php echo TreTodayUrl::getAppUrl('computer') ?>">Computers
                                    </a>
                                    <a class="<?php echo $app == 'dientu' ? 'active_menu' : '' ?>"
                                       href="<?php echo TreTodayUrl::getAppUrl('dientu') ?>">Điện tử
                                    </a>
                                    <a href="<?php echo TreTodayUrl::getUpProductUrl() ?>">Đăng Bán</a>
                                    <a class="<?php echo preg_match('/co-the-ban-quan-tam/', TreTodayCommon::getCurrentUrl()) ? 'active_menu' : '' ?>"
                                       href="<?php echo TreTodayUrl::getInterestedUrl() ?>">Có thể bạn quan tâm
                                    </a>
                                </div>
                                <div>
                                    <div class="inp_search">
                                        <input type="text" value="" id="txtKeyword" class="input_text" name="string">
                                        <select name="act" id="ddlCategory">
                                            <option selected="true" value="0">Chuyên mục rao vặt</option>
                                            <option value="22">Giải trí - Mỹ thuật</option>
                                            <option value="18">Hoa - Quà tặng</option>
                                            <option value="9">Kim khí điện máy</option>
                                            <option value="26">Shop tổng hợp</option>
                                            <option value="13">Thời trang - Mỹ phẩm</option>
                                            <option value="5">Điện thoại - Kỹ thuật số</option>
                                        </select>
                                        <input type="submit" id="btnSearch" value="Tìm kiếm" class="input_bt" name="do">
                                        <input type="hidden" value="category" name="app">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="open_js">
                            <div class="float-left">
                                <?php if (!Yii::app()->user->isGuest) { ?>
                                    <div style="color:white;width: 500px; padding-left: 15px"> Xin chào
                                        <a style="color: white"
                                           href="<?php echo TreTodayUrl::getUserUrl(Yii::app()->user->id, Yii::app()->user->getFullName()) ?>">
                                            <?php echo Yii::app()->user->getFullName() ?>
                                        </a>
                                        |
                                        <a style="color: white" href="
                                        <?php echo TreTodayUrl::getLogoutUrl() ?>">Thoát
                                        </a>

                                    </div>
                                <?php } ?>
                            </div>
                            <span>
                                <a class="blue" href="<?php echo TreTodayUrl::getChangeThemeUrl('blue') ?>"></a>
                                <a class="green" href="<?php echo TreTodayUrl::getChangeThemeUrl('green') ?>"></a>
                                <a class="yellow" href="<?php echo TreTodayUrl::getChangeThemeUrl('orange') ?>"></a>
                                <a class="pink" href="<?php echo TreTodayUrl::getChangeThemeUrl('pink') ?>"></a>
                            </span>
                            <label>Change Color:</label>
                        </div>
                        <div class="header_js">
                            <p>
                                <a onclick="showHideIdAuto_header_sh();" class="pic_sh_up_js" id="collap_sh_js"
                                   href="#"></a>
                            </p>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <div id="vj_content">
            <?php echo $content ?>
        </div>
        <div id="vj_wrapper_footer">
            <div id="footer_main">
                <div style="margin: 0pt auto 8px; width: 980px;">
                    <iframe height="207" frameborder="no" width="980" scrolling="no" framespacing="0"
                            src="http://vienlien247.com/box/shopping/index.php"></iframe>
                </div>
                <div style="height:90px; padding-top:10px;padding-bottom:10px; overflow:hidden; margin:0 auto">
                    <a href="http://phivanchuyen.com" target="_blank" title="phí vận chuyển">
                        <img alt="Phí vận chuyển"
                             src="<?php echo TreTodayUrl::home() . '/images/phivanchuyen_big.gif' ?>"/>
                    </a>
                </div>
                <div id="list_name_footer">
                    <?php $this->widget('WidgetFooter'); ?>

                </div>
                <?php $this->widget('WidgetEndFooter'); ?>
            </div>
        </div>
    </div>
</div>

<script>
    TreToday.baseUrl = "<?php echo TreTodayUrl::home()?>";
    $(function () {
        // run the code in the markup!
        $('div pre code').each(function () {
            eval($(this).text());
        });
    });

    function showHideIdAuto_headertop() {
        if (document.getElementById('list_name_top').style.display == '') {
            document.getElementById('list_name_top').style.display = 'none';
            document.getElementById('collap_js').className = 'pic_js';
        }
        else {
            document.getElementById('list_name_top').style.display = '';
            document.getElementById('collap_js').className = 'pic_js_up';
        }

        return;
    }

    function changetab(obj) {
        if (obj == 'click_pic_top1') {
            clearTimeout(t);
            document.getElementById("show_pic_top1").style.display = "block";
            document.getElementById("click_pic_top1").className = "active_js_top";
        }
        else {
            document.getElementById("show_pic_top1").style.display = "none";
            document.getElementById("click_pic_top1").className = "";
        }
        if (obj == 'click_pic_top2') {
            clearTimeout(t);
            document.getElementById("show_pic_top2").style.display = "block";
            document.getElementById("click_pic_top2").className = "active_js_top";
        }
        else {
            document.getElementById("show_pic_top2").style.display = "none";
            document.getElementById("click_pic_top2").className = "";
        }
        if (obj == 'click_pic_top3') {
            clearTimeout(t);
            document.getElementById("show_pic_top3").style.display = "block";
            document.getElementById("click_pic_top3").className = "active_js_top";
        }
        else {
            document.getElementById("show_pic_top3").style.display = "none";
            document.getElementById("click_pic_top3").className = "";
        }
        if (obj == 'click_pic_top4') {
            clearTimeout(t);
            document.getElementById("show_pic_top4").style.display = "block";
            document.getElementById("click_pic_top4").className = "active_js_top";
        }
        else {
            document.getElementById("show_pic_top4").style.display = "none";
            document.getElementById("click_pic_top4").className = "";
        }
        if (obj == 'click_pic_top5') {
            clearTimeout(t);
            document.getElementById("show_pic_top5").style.display = "block";
            document.getElementById("click_pic_top5").className = "active_js_top";
        }
        else {
            document.getElementById("show_pic_top5").style.display = "none";
            document.getElementById("click_pic_top5").className = "";
        }
        if (obj == 'click_pic_top6') {
            clearTimeout(t);
            document.getElementById("show_pic_top6").style.display = "block";
            document.getElementById("click_pic_top6").className = "active_js_top";
        }
        else {
            document.getElementById("show_pic_top6").style.display = "none";
            document.getElementById("click_pic_top6").className = "";
        }
    }

    var j = 0;
    var t;

    // This function toggles an element's text between two values
    jQuery.fn.textToggle = function (text1, text2) {
        jQuery(this).text(( jQuery(this).text() == text1 ? text2 : text1 ));
    };
    $(document).ready(function () {
        $('#btnSearch').click(function () {
            var $base = "<?php echo TreTodayUrl::home()?>";
            var $keyword = $("#txtKeyword").val();
            $keyword = $keyword.trim();
            if ($keyword == "") {
                alert("Vui lòng nhập từ khóa");
            }
            else document.location = $base + '/search/' + $("#ddlCategory").val() + '/' + $("#txtKeyword").val();
        });
        $('#imageMenu>ul').imagemenu({openWidth: 550, totalSteps: 5, timeStep: 100});

        var etiquette_box = $("#addons-display-review-etiquette").hide();
        $("#short-review").focus(function () {
            etiquette_box.show("fast");
        });

        $("img").error(function () {
//            $(this).remove();
            $(this).attr("src", TreToday.baseUrl + "/images/no_image.jpg");
        });
    });
</script>

<noscript>
    <p>
        <img src="http://link.traodoibanner.com/analytic/piwik.php?idsite=42" style="border:0" alt=""/>
    </p>
</noscript>

</body>
</html>
